// components/address-card/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    titleName: { 
      type: String,
      value: "",
    },
    titlePhone: { 
      type: String,
      value: "",
    },
    addressId: {
      type: Number,
      value: 0
    },
    data: {
      type: String,
      value: "展示没有数据"
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    dele:function(e){
      var addressId = e.target.dataset.id
      this.triggerEvent("dele", {addressId})
    }, 
    edit: function(e) {
      this.triggerEvent("edit", {addressId: this.properties.addressId})
    }
  }
})
